home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / misc / How to set up an ftp anonymous site < prev    next >
Encoding:
Internet Message Format  |  1992-10-18  |  3.5 KB

  1. Path: usage.csd.unsw.oz.au!metro!munnari.oz.au!uhccux!ames!rex!wuarchive!zaphod.mps.ohio-state.edu!caen!ox.com!emv
  2. From: hines@portia.Stanford.EDU (Melissa Hines)
  3. Newsgroups: comp.archives
  4. Subject: [unix-questions] Summary: How to set up an ftp anonymous site
  5. Message-ID: <1990Dec6.035506.27367@ox.com>
  6. Date: 6 Dec 90 03:55:06 GMT
  7. References: <1990Dec5.204431.18677@portia.Stanford.EDU>
  8. Sender: emv@ox.com (Edward Vielmetti)
  9. Reply-To: hines@portia.Stanford.EDU (Melissa Hines)
  10. Followup-To: comp.unix.questions
  11. Organization: Stanford University - AIR
  12. Lines: 76
  13. Approved: emv@ox.com (Edward Vielmetti)
  14. X-Original-Newsgroups: comp.unix.questions
  15.  
  16. Archive-name: ftp/server/setup/1990-12-05
  17. Original-posting-by: hines@portia.Stanford.EDU (Melissa Hines)
  18. Original-subject: Summary: How to set up an ftp anonymous site
  19. Reposted-by: emv@ox.com (Edward Vielmetti)
  20.  
  21. About a week ago, I asked the net how to set up an ftp anonymous account.  
  22.    Here is a summary of the replies.  Many thanks to the people who took 
  23.    the time to answer my question!
  24.  
  25. Simple answer -- RTFM!
  26.    This is actually a little trickier than it sounds!  You need to look at
  27.    man ftpd.
  28. More verbose answer:
  29.    I received a number of replies that were all very similar.  The one I
  30.    quote here came from the SRI Intl. Report "Improving the Security of
  31.    Your Unix System" via Andi Karrer.
  32.  
  33. ___________________________________________________________________________
  34. 1) make sure your /usr/etc/ftpd (or ftpd.gw) is newer than Dec 1988. If not
  35.    urge DEC to give you a new one cause this one may have a real bug.
  36.  
  37. 2) make a user "ftp". Disable the password (put * in the second field).
  38.    make the login directory to where you want to put the anon ftp files.
  39.    The /etc/passwd entry should look like:
  40.         ftp:*:12:12:Anon ftp:/usr/local/ftp:/bin/true
  41.    The /etc/group entry should look like:
  42.         ftp:*:12:
  43.    make sure uid and gid are normal user id's, e.g not "root".
  44.        **** Very important ****
  45.  
  46. 3) make a home directory for ftp unwritable by anyone:
  47.         # mkdir /usr/local/ftp
  48.         # chown ftp ~ftp
  49.         # chmod 555 ~ftp
  50.  
  51. 4) make the directory ~ftp/bin, owned by root and unwritable by anyone. Put
  52.    a copy of the "ls" program there:
  53.         # mkdir ~ftp/bin
  54.         # chown root ~ftp/bin
  55.         # chmod 555 ~ftp/bin
  56.         # cp -p /bin/ls ~ftp/bin
  57.         # chmod 111 ~ftp/bin/ls
  58.  
  59. 5) make the directory ~ftp/etc, owned by root and unwritable by anyone. put
  60.    a stripped-down copy of /etc/passwd and /etc/group there. the files
  61.    should only contain the entry for the user "ftp".
  62.         # mkdir ~ftp/etc
  63.         # chown root ~ftp/etc
  64.         # chmod 555 ~ftp/etc
  65.         # grep '^ftp:' /etc/passwd > ~ftp/etc/passwd
  66.         # grep '^ftp:' /etc/group  > ~ftp/etc/group
  67.         # chmod 444 ~ftp/etc/passwd ~ftp/etc/group
  68.  
  69. 6) make the directory ~ftp/etc/pub, owned by "ftp" and writable by anyone.
  70.    anon ftp users may the place files there. alternatively, if you want anon
  71.    ftp users only to be able to GET fies from your system, make the directory
  72.    unwritable by anyone except root.
  73.         # mkdir ~ftp/pub
  74.         # chown ftp ~ftp/pub
  75.         # chmod 777 ~ftp/pub          - or 555
  76.  
  77. _____________________________________________________________________________
  78. Thanks to all the people who replied
  79.     Andi Karrer
  80.     Tim Ramsey
  81.     Joe Hamlin
  82.     David Elliott
  83.     Nick Sayer
  84.     Jeff Kays
  85.     Gary Weimer
  86.  
  87. If you would like a copy of all the replies that I received, I will be happy to send them to you.
  88.  
  89. Melissa A. Hines
  90. Dept. of Chemistry
  91. Stanford University
  92.